package com.code.day16DuoXian2.not07Consumer;

import java.util.function.Consumer;


public class Test01 {

    public static void main(String[] args) {
        method(new Consumer<String>() {
            @Override
            public void accept(String s) {
                System.out.println(s.length());
            }
        },"asdfsfasg");

        System.out.println("===================");

        method( s-> System.out.println(s.length()),"asdfsfasg");
    }

    public static void method(Consumer<String> consumer, String s) {
        consumer.accept(s);
    }

}
